package com.twu.biblioteca;

public class User {
    private final String name;
    private final String emailAddress;
    private final String telephoneNumber;
    private final String username;
    private final String password;
    private boolean loginStatus;

    public User(String name, String emailAddress, String telephoneNumber, String username, String password, boolean loginStatus) {

        this.name = name;
        this.emailAddress = emailAddress;
        this.telephoneNumber = telephoneNumber;
        this.username = username;
        this.password = password;
        this.loginStatus = loginStatus;
    }

    @Override
    public String toString() {
        return name+"\t"+emailAddress+"\t"+telephoneNumber;
    }

    public boolean hasLoggedIn() {
        return loginStatus;
    }

    public void checkIn() {
        loginStatus = true;
    }

    public void checkOut() {
        loginStatus = false;
    }

    public String getUsername() {
        return username;
    }

    public String getPassword() {
        return password;
    }
}
